Skip to content

fix: safely copy text when Clipboard API is unavailable#503

Open
Moviw wants to merge 1 commit into
openagents-org:developfrom
Moviw:fix/issue-444-safe-clipboard
Open

fix: safely copy text when Clipboard API is unavailable#503
Moviw wants to merge 1 commit into
openagents-org:developfrom
Moviw:fix/issue-444-safe-clipboard

Conversation

@Moviw

@Moviw Moviw commented Jun 18, 2026

Copy link
Copy Markdown

Summary

Fix clipboard operations when navigator.clipboard is unavailable or rejects the write, such as on non-secure HTTP origins.

  • use the Clipboard API when available
  • fall back to a temporary textarea and document.execCommand("copy")
  • remove the temporary element after every fallback attempt
  • keep existing copied-state and error behavior unchanged
  • replace unsafe direct clipboard calls across Workspace, Go Web, Studio, and Launcher

Testing

  • clipboard regression tests: 5 passed
  • Go Web production build passed
  • Workspace production build passed
  • Studio production build passed
  • Launcher production build passed
  • manually verified fallback copying in Chrome on a non-secure HTTP origin

Fixes #444

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

@Moviw is attempting to deploy a commit to the Raphael's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy buttons crash when navigator.clipboard is unavailable

1 participant